home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Palm Pilot Collection
/
Palm Pilot Collection (Explore the World of Software) (1998).iso
/
apps
/
weather2.exe
/
citylist.bat
< prev
next >
Wrap
DOS Batch File
|
1997-06-02
|
2KB
|
53 lines
@echo off
REM -- THIS IS CITYLIST.BAT ver. 1.1
REM -- This version adds the explanation of
REM -- the backslash-s convention for double names.
grabwthr Dallas New\sYork Chicago London San\sAntonio Tokyo
rem -- Edit or add to the names of cities above for which
rem -- you want to extract the weather forecast.
rem -- For names separated by a blank, like New York,
rem -- DOS would treat New and York as separate
rem -- parameters and cause MiniTrue to look for
rem -- all cities beginning with New *and* for
rem -- all cities beginning with York (if there
rem -- were any). It'll work, but you'll get more
rem -- cities than you want (like New Orleans
rem -- and New Delhi.)
rem -- You can't put city names in quotes because
rem -- if you use quotes the quote character itself
rem -- gets matched and everything screws up.
rem -- So the trick is to put something between
rem -- the two words to cause DOS to treat them as a
rem -- single parameter, but that won't screw up MiniTrue's
rem -- string search function. The backslash-s
rem -- characters (\s) do the trick because in the
rem -- world of string search-and-replace processors,
rem -- backslash-s means "whitespace" or blanks.
rem -- Alternatively, you can specify the full name
rem -- of the city by editing the
rem -- GRABWTHR.BAT file. See that file for
rem -- examples of how it can be done. If you are
rem -- going to want to get weather for double-named
rem -- cities like New York regularly, then you
rem -- might just want to edit that file.
rem --
rem -- If a city appears more than once in the
rem -- PointCast files, like "Chicago," which has
rem -- entries for both of the Chicago airports,
rem -- you will get both listings. New York also
rem -- has two listings, by the way.
rem -- This whole thing works by string matches at the
rem -- beginning of the city name, so putting in
rem -- "S" (without the quotes) instead of "Seattle"
rem -- will get all cities that begin with "S".